<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:63:"E:\phpCloud\ruanlink\public/../app/spadmin\view\index\site.html";i:1733014853;s:54:"E:\phpCloud\ruanlink\app\spadmin\view\public\base.html";i:1732971886;}*/ ?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
		<title>后台管理系统</title>
		<!-- 样 式 文 件 -->
		<link rel="stylesheet" href="/assets/library/core/css/core.css?v=<?php echo config('version'); ?>" />
        
	</head>
    <!-- 代 码 结 构 -->
	
<style>
    .layui-text {line-height: 2.6;}
</style>
<body class="pear-container">
	<div class="layui-card">
        <div class="layui-card-header">配置参数</div>
        <div class="layui-card-body">
            <form class="layui-form layui-form-pane" action="">
                <?php if(is_array($config) || $config instanceof \think\Collection || $config instanceof \think\Paginator): $i = 0; $__LIST__ = $config;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                    <div class="pear-row pear-col-space10">
                        <div class="pear-col pear-col-md2 layui-text"><?php echo $vo['title']; ?></div>
                        <div class="pear-col pear-col-md20">
                            <?php if($vo['type'] == 'input'): ?>
                            <input type="text" name="<?php echo $vo['name']; ?>" value="<?php echo (isset($vo['value']) && ($vo['value'] !== '')?$vo['value']:''); ?>" autocomplete="off"
                                placeholder="" class="layui-input">
                            <?php else: ?> 
                            <textarea name="<?php echo $vo['name']; ?>" class="layui-textarea" style="min-height:400px"><?php echo (isset($vo['value']) && ($vo['value'] !== '')?$vo['value']:''); ?></textarea>
                            <?php endif; ?>
                        </div>
                        <div class="pear-col pear-col-md2 layui-text layui-text-em"><?php echo (isset($vo['tips']) && ($vo['tips'] !== '')?$vo['tips']:'&nbsp;'); ?></div>
                    </div>
                <?php endforeach; endif; else: echo "" ;endif; ?>
                <div class="pear-row pear-col-space10">
                    <div class="pear-col pear-col-lg-offset2 ">
                        <button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="form-save">
                            <i class="layui-icon layui-icon-ok"></i> 提交
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</body>

    <!-- 资 源 引 入 -->
		<script src="/assets/library/layui/layui.js?v=12<?php echo config('version'); ?>"></script>
		<script src="/assets/library/core/core.js?v=12<?php echo config('version'); ?>"></script>
		<script src="/static/js/qiniu.min.js?v=12<?php echo config('version'); ?>"></script>
	
	<script type="text/html" id="table-toolbar">
		<button class="pear-btn pear-btn-primary pear-btn-md" lay-event="add">
			<i class="layui-icon layui-icon-add-1"></i>
			新增
		</button>
		<button class="pear-btn pear-btn-danger pear-btn-md" lay-event="batchRemove">
			<i class="layui-icon layui-icon-delete"></i>
			删除
		</button>
	</script>
	<script type="text/html" id="table-bar">
		<button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="edit"><i class="layui-icon layui-icon-edit"></i></button>
		<button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="remove"><i class="layui-icon layui-icon-delete"></i></button>
	</script>
	
    
<script>
    layui.use(['form','jquery','element','select'], function() {
        let form = layui.form;
        let $ = layui.jquery;
        let select = layui.select;
        form.on('submit(form-save)', function(data) {
            $.ajax({
                url: '<?php echo url("site"); ?>',
                data: JSON.stringify(data.field),
                dataType: 'json',
                contentType: 'application/json',
                type: 'post',
                success: function(result) {
                    if (result.code == '1') {
                        layer.msg(result.msg, {
                            icon: 1,
                            time: 1000
                        });
                    } else {
                        layer.msg(result.msg, {
                            icon: 2,
                            time: 1000
                        });
                    }
                }
            })
            return false;
        });
    })
</script>

</html>
